package com.buer.storage.dao;



import com.buer.storage.dto.CorderDto;
import com.buer.storage.dto.CorderStorageDto;
import com.buer.storage.dto.CorderdetailsDto;
import com.buer.storage.dto.StockDto;
import com.buer.storage.entity.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface CorderDao {
    //盘点单增加
    int insertCorder(CorderStorageDto corderStorageDto);
    List<Corder> selectByAll(Map<String, Object> map);

    //盘点商品单增加
    int insertCorderdetails(@Param(value="arrary") CorderdetailsDto[] corderPutProds);

    //查询盘点表
    List<CorderStorageDto> findCorderAllById(Integer checkId);

    //根据盘点表ID查询盘点表详情信息
    CorderdetailsDto[] findCorderdetailsAllById(Integer checkId);

    //查询所有盘点单
    List<CorderDto> findCorderAll();

    //根据盘点单ID删除所有盘点信息
    int deleteCorderAllById(Integer checkId);

    //根据盘点单ID删除盘点信息
    int deleteCorderByCheckId(Integer checkId);

    //根据盘点单ID删除盘点商品信息
    int deleteCorderDetailsByCheckId(Integer checkId);

    List<StockDto> findStockByWarehouseId(Integer warehouseId);

    List<StockDto> findStockByProdArea(Integer prodArea,Integer warehouseId);

    List<StockDto> findStockByProdDepart(Integer prodDepart,Integer prodArea,Integer warehouseId);

    List<StockDto> searchStockAll(Map<String, Object> map);

    List<CorderDto> getCord(Map<String, Object> map);
    List<Corderdetails> getCorderdetails(Map<String, Object> map);

    List<CorderDto> findCorderByStatus(Integer checkStatus);

    List<Stockdetails> findStockdetailsByCheckid(Integer checkId);

    int findCountByStatus(Integer checkStatus);


    Corder findCorder(Integer checkId);

    int updateCorder(Corder corder);
}
